#!/bin/sh

MUN=0
for ((i=1;i<5;i++))
do
File=`./random 1 5`
    for ((a=0;a<3;a++))
    do
    echo "请输入一个数字:"
    read num
	if [ $num -eq $File ];then
        echo "恭喜，猜中了，加1分"
        MUN=$(($MUN+1))
        break
    elif [ $num -lt $File ];then
        echo "小于目的数"
    elif [ $num -gt $File ];then
        echo "大于目的数"
         fi
    done
done
echo "你的分数是"$MUN
